*This file runs the regressions for Table A7

*Table A7, Panel A: Differential Impacts Across Land Tenure Regimes, did_multiplegt
*******************************************************************************
*******************************************************************************

*Part i): Fee Simple

preserve
keep if Fee ==1
*Baseline with no rezxt controls
did_multiplegt agpct ID	 year post, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Agriculture (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) ) 
estadd scalar tstat = e(effect_average)/e(se_effect_average)

*off-rez population
did_multiplegt agpct ID	 year post, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) controls(offrespop) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Agriculture (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) )  
estadd scalar tstat = e(effect_average)/e(se_effect_average)

*casinos
did_multiplegt agpct ID	 year post, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) controls(has_casino) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Agriculture (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) )  
estadd scalar tstat = e(effect_average)/e(se_effect_average)

*credit
did_multiplegt agpct ID	 year post, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) controls(has_credit) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Agriculture (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) ) 
estadd scalar tstat = e(effect_average)/e(se_effect_average)

*all rez-t controls
did_multiplegt agpct ID	 year post, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) controls(offrespop has_casino has_credit) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Agriculture (%)) scheme(white_hue) ysize(20) xsize(20) xline(-.5) legend(off)) 
estadd scalar tstat = e(effect_average)/e(se_effect_average)

restore


*Part ii): Allotted Trust


preserve
keep if Allotted ==1
*Baseline with no rezxt controls
did_multiplegt agpct ID	 year post, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Agriculture (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) ) 
estadd scalar tstat = e(effect_average)/e(se_effect_average)

*off-rez population
did_multiplegt agpct ID	 year post, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) controls(offrespop) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Agriculture (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) )  
estadd scalar tstat = e(effect_average)/e(se_effect_average)

*casinos
did_multiplegt agpct ID	 year post, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) controls(has_casino) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Agriculture (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) )  
estadd scalar tstat = e(effect_average)/e(se_effect_average)

*credit
did_multiplegt agpct ID	 year post, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) controls(has_credit) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Agriculture (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) ) 
estadd scalar tstat = e(effect_average)/e(se_effect_average)

*all rez-t controls
did_multiplegt agpct ID	 year post, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) controls(offrespop has_casino has_credit) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Agriculture (%)) scheme(white_hue) ysize(20) xsize(20) xline(-.5) legend(off)) 
estadd scalar tstat = e(effect_average)/e(se_effect_average)

restore



*Part iii): Tribal Trust

preserve
keep if Tribal ==1
*Baseline with no rezxt controls
did_multiplegt agpct ID	 year post, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Agriculture (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) ) 
estadd scalar tstat = e(effect_average)/e(se_effect_average)

*off-rez population
did_multiplegt agpct ID	 year post, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) controls(offrespop) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Agriculture (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) )  
estadd scalar tstat = e(effect_average)/e(se_effect_average)

*casinos
did_multiplegt agpct ID	 year post, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) controls(has_casino) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Agriculture (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) )  
estadd scalar tstat = e(effect_average)/e(se_effect_average)

*credit
did_multiplegt agpct ID	 year post, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) controls(has_credit) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Agriculture (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) ) 
estadd scalar tstat = e(effect_average)/e(se_effect_average)

*all rez-t controls
did_multiplegt agpct ID	 year post, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) controls(offrespop has_casino has_credit) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Agriculture (%)) scheme(white_hue) ysize(20) xsize(20) xline(-.5) legend(off)) 
estadd scalar tstat = e(effect_average)/e(se_effect_average)

restore







*Table A7, Panel B: Differential Impacts Across Land Tenure Regimes, csdid
*******************************************************************************
*******************************************************************************

*Part i): Fee Simple
preserve
keep if  Fee ==1

eststo clear
*Baseline with no rezxt controls
csdid agpct , ivar(ID) time(t) gvar(TG)  cluster(TOWNSHIP) agg(simple) drimp


*off-rez population
csdid agpct offrespop, ivar(ID) time(t) gvar(TG)  cluster(TOWNSHIP) agg(simple) drimp


*casinos
csdid agpct has_casino, ivar(ID) time(t) gvar(TG)  cluster(TOWNSHIP) agg(simple) drimp


*credit
csdid agpct has_credit, ivar(ID) time(t) gvar(TG)  cluster(TOWNSHIP) agg(simple) drimp


*all rez-t controls
csdid agpct offrespop has_casino has_credit, ivar(ID) time(t) gvar(TG)  cluster(TOWNSHIP) agg(simple) drimp


restore



*Part ii): Allotted Trust
preserve
keep if Allotted ==1

eststo clear
*Baseline with no rezxt controls
csdid agpct , ivar(ID) time(t) gvar(TG)  cluster(TOWNSHIP) agg(simple) drimp


*off-rez population
csdid agpct offrespop, ivar(ID) time(t) gvar(TG)  cluster(TOWNSHIP) agg(simple) drimp


*casinos
csdid agpct has_casino, ivar(ID) time(t) gvar(TG)  cluster(TOWNSHIP) agg(simple) drimp


*credit
csdid agpct has_credit, ivar(ID) time(t) gvar(TG)  cluster(TOWNSHIP) agg(simple) drimp


*all rez-t controls
csdid agpct offrespop has_casino has_credit, ivar(ID) time(t) gvar(TG)  cluster(TOWNSHIP) agg(simple) drimp


restore



*Part iii): Tribal Trust
preserve
keep if Tribal ==1

eststo clear
*Baseline with no rezxt controls
csdid agpct , ivar(ID) time(t) gvar(TG)  cluster(TOWNSHIP) agg(simple) drimp


*off-rez population
csdid agpct offrespop, ivar(ID) time(t) gvar(TG)  cluster(TOWNSHIP) agg(simple) drimp


*casinos
csdid agpct has_casino, ivar(ID) time(t) gvar(TG)  cluster(TOWNSHIP) agg(simple) drimp


*credit
csdid agpct has_credit, ivar(ID) time(t) gvar(TG)  cluster(TOWNSHIP) agg(simple) drimp


*all rez-t controls
csdid agpct offrespop has_casino has_credit, ivar(ID) time(t) gvar(TG)  cluster(TOWNSHIP) agg(simple) drimp


restore



*Table A7, Panel C: Differential Impacts Across Land Tenure Regimes, twfe
*******************************************************************************
*******************************************************************************


preserve 
keep if tenure <=3

eststo clear
*Baseline with no rezxt controls
reghdfe agpct post allotted_post tribal_post , absorb(ID stateXyear) cluster(TOWNSHIP)
sum agpct if e(sample) ==1
estadd scalar MDV = r(mean)
lincom  post + allotted_post
estadd scalar adiff = r(estimate)
estadd scalar ase_diff = r(se)
estadd scalar apval = 2*normal(-abs(r(estimate)/r(se)))
lincom  post + tribal_post
estadd scalar tdiff = r(estimate)
estadd scalar tse_diff = r(se)
estadd scalar tpval = 2*normal(-abs(r(estimate)/r(se)))
est sto twfe_ag_tenure_1

*off-rez population
reghdfe agpct post  allotted_post tribal_post offrespop , absorb(ID stateXyear) cluster(TOWNSHIP)
sum agpct if e(sample) ==1
estadd scalar MDV = r(mean)
lincom  post + allotted_post
estadd scalar adiff = r(estimate)
estadd scalar ase_diff = r(se)
estadd scalar apval = 2*normal(-abs(r(estimate)/r(se)))
lincom  post + tribal_post
estadd scalar tdiff = r(estimate)
estadd scalar tse_diff = r(se)
estadd scalar tpval = 2*normal(-abs(r(estimate)/r(se)))
est sto twfe_ag_tenure_2

*casinos
reghdfe agpct post  allotted_post tribal_post has_casino, absorb(ID stateXyear) cluster(TOWNSHIP)
sum agpct if e(sample) ==1
estadd scalar MDV = r(mean)
lincom  post + allotted_post
estadd scalar adiff = r(estimate)
estadd scalar ase_diff = r(se)
estadd scalar apval = 2*normal(-abs(r(estimate)/r(se)))
lincom  post + tribal_post
estadd scalar tdiff = r(estimate)
estadd scalar tse_diff = r(se)
estadd scalar tpval = 2*normal(-abs(r(estimate)/r(se)))
est sto twfe_ag_tenure_3

*credit
reghdfe agpct post  allotted_post tribal_post has_credit, absorb(ID stateXyear) cluster(TOWNSHIP)
sum agpct if e(sample) ==1
estadd scalar MDV = r(mean)
lincom  post + allotted_post
estadd scalar adiff = r(estimate)
estadd scalar ase_diff = r(se)
estadd scalar apval = 2*normal(-abs(r(estimate)/r(se)))
lincom  post + tribal_post
estadd scalar tdiff = r(estimate)
estadd scalar tse_diff = r(se)
estadd scalar tpval = 2*normal(-abs(r(estimate)/r(se)))
est sto twfe_ag_tenure_4

*all rez-t controls
reghdfe agpct post  allotted_post tribal_post offrespop has_casino has_credit, absorb(ID stateXyear) cluster(TOWNSHIP)
sum agpct if e(sample) ==1
estadd scalar MDV = r(mean)
lincom  post + allotted_post
estadd scalar adiff = r(estimate)
estadd scalar ase_diff = r(se)
estadd scalar apval = 2*normal(-abs(r(estimate)/r(se)))
lincom  post + tribal_post
estadd scalar tdiff = r(estimate)
estadd scalar tse_diff = r(se)
estadd scalar tpval = 2*normal(-abs(r(estimate)/r(se)))
est sto twfe_ag_tenure_5


esttab twfe_ag_tenure_*,  se(a3) b(a3) star(* 0.1 ** 0.05 *** 0.01) ar2  replace   scalar(N_clust M1 MDV adiff apval tdiff tpval)

restore


